package com.obas.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.TextualEnum;

/**
 * 
 * @author nathanleewei
 * 
 */
public enum TimeDimensionType implements TextualEnum {

	MINUTE("分", "MINUTE"), //
	HOUR("时", "HOUR"), //
	DAY("天", "DAY"), //
	WEEK("周", "WEEK"), //
	MONTH("月", "MONTH"), //
	SEASON("季", "SEASON"), //
	YEAR("年", "YEAR");//

	private String text;

	private String code;

	private TimeDimensionType(String text, String code) {
		this.text = text;
		this.code = code;
	}

	public static TimeDimensionType get(String name) {
		return EnumUtil.get(TimeDimensionType.class, name);
	}

	public String getText() {
		return text;
	}

	public String getName() {
		return name();
	}

	public String getTablePart() {
		return name();
	}

	public String getCode() {
		return code;
	}
}
